Pairing of media streaming devices

ABSTRACT

Among other things, this document describes a computer-implemented method. The method can include receiving, at a first device, an indication of user input to cause the first device to establish a wireless data connection with another device. A determination can be made at the first device that one or more sensors on the first device are oriented toward a second device. In response to at least one of (i) receiving the indication of user input to cause the first device to establish a wireless data connection with another device and (ii) determining that the one or more sensors on the first device are oriented toward the second device, a first wireless data connection can be established between the first device and the second device. A first stream of audio data can be received and played at the first device.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. patent application Ser. No.14/823,367, filed Aug. 11, 2015, which is hereby incorporated byreference herein in its entirety.

TECHNICAL FIELD

The subject matter of this document generally relates to wirelessstreaming of media content, such as audio streaming.

BACKGROUND

Wireless communication protocols have been developed for streaming mediacontent from one electronic device to another. This can be beneficial,for example, when media content is accessible through a first device,but the second device offers advantages over the first device inpresenting the media content, such as having more powerful speakers forplaying audio, or having a larger or higher-resolution display than thefirst device. For example, a user may access music from a library in amedia application installed on the user's smartphone. The user may wishto play the music with greater volume or with more bass than thesmartphone's speakers are capable of producing. Accordingly, a wirelesscommunications protocol may be used to pair the smartphone with awireless speaker, so that audio may be streamed from the smartphone tothe wireless speaker for playback by the wireless speaker. In somesituations, users may prefer listening to streaming music more quietlywithout disturbing others nearby. Rather than pairing their streamingdevices (e.g., a smartphone) to a wireless loud speaker, these users mayinstead pair their streaming devices to wireless headphones.

SUMMARY

This document generally describes systems, methods, devices, and othertechniques for pairing media-receiving devices, such as wirelessheadphones or wireless loud speakers, with media-streaming devices thatprovide the streamed content to be played by the receiving devices. Insome implementations, users can easily switch connections among multipledifferent streaming devices by orienting the receiving device toward atarget streaming device that is to be paired, and selecting a control toinitiate pairing with the target streaming device.

Some implementations of the subject matter described herein include acomputer-implemented method. The method can include receiving, at afirst device, an indication of user input to cause the first device toestablish a wireless data connection with another device. Adetermination can be made at the first device that one or more sensorson the first device are oriented toward a second device. In response toat least one of (i) receiving the indication of user input to cause thefirst device to establish a wireless data connection with another deviceand (ii) determining that the one or more sensors on the first deviceare oriented toward the second device, a first wireless data connectioncan be established between the first device and the second device. Afirst stream of audio data can be received at the first device and overthe first wireless data connection from the second device, and audioencoded in the first stream of audio data can be caused to be playedthrough one or more speakers of the first device.

These and other implementations can include one or more of the followingfeatures.

The first device can be wireless headphones, the wireless headphonesincluding the one or more speakers and a wireless communicationsinterface for establishing one or more wireless data connections.

Receiving the indication of user input to cause the first device toestablish a wireless data connection with another device can includeidentifying that a control located on the headphones has been selected.

In response to establishing the first wireless data connection betweenthe first device and the second device, at least one of visual feedbackand aural feedback can be generated by the first device to indicate to auser of the first device that the first wireless data connection hasbeen established.

Determining that the one or more sensors on the first device areoriented toward the second device can include obtaining, at the firstdevice, an identifier for the second device. The identifier can beobtained as a result of the one or more sensors on the first devicebeing oriented toward the second device while the second device islocated in front of the one or more sensors on the first device.

Obtaining the identifier for the second device can include: (i)detecting, with the one or more sensors on the first device, aline-of-sight signal emitted by the second device, and (ii) determining,by the first device and based on information encoded in theline-of-sight signal, the identifier for the second device. The one ormore sensors on the first device can be arranged to: (i) detect theline-of-sight signal when the one or more sensors are oriented towardthe second device and are located within a path of the line-of-sightsignal, and (ii) not detect the line-of-sight signal when the one ormore sensors are oriented away from the second device or are locatedoutside of the path of the line-of-sight signal.

The line-of-sight signal emitted by the second device can include aninfrared data signal, and the one or more sensors on the first devicecan include one or more infrared sensors.

The first device can include (i) one or more infrared lights thatcomprise an infrared illuminator and (ii) an infrared camera.Determining that the one or more sensors on the first device areoriented toward the second device can include: (i) activating the one ormore infrared lights to illuminate a region in front of the infraredcamera of the first device; and (ii) identifying the second device froman image of at least a portion of the second device that was captured bythe infrared camera while the one or more infrared lights wereactivated.

The image of the at least the portion of the second device can include areflection of a retroreflective component affixed to the second device,the retroreflective component including an identifier for the seconddevice.

The one or more sensors on the first device can include a firstmicrophone at a first location on the first device and a secondmicrophone at a second location on the first device, the second locationbeing separated by a non-zero distance from the first location.Determining, at the first device, that the one or more sensors on thefirst device are oriented toward the second device can include:detecting, with the first microphone, an audio signal generated by thesecond device; detecting, with the second microphone, the audio signalgenerated by the second device; comparing the audio signal as detectedwith the first microphone and the audio signal as detected with thesecond microphone; and determining, based on a result of the comparing,whether the second device is located in a central region in front of thefirst microphone and the second microphone, such that the firstmicrophone and the second microphone are oriented toward the seconddevice.

The one or more sensors on the first device can include a directionalmicrophone that is sensitive to audio emitted from a location in frontof at least a portion of the first device, but that is substantiallyinsensitive to audio emitted from locations other than the location infront of the at least the portion of the first device. Determining, atthe first device, that the one or more sensors on the first device areoriented toward the second device can include detecting an audio signal,with the directional microphone, which has been emitted by the seconddevice.

The first wireless data connection can include a BLUETOOTH connection.

An indication of second user input to cause the first device to switchto another wireless data connection with another device can be receivedat the first device while maintaining the first wireless data connectionbetween the first device and the second device. A determination can bemade at the first device that the one or more sensors on the firstdevice are oriented toward a third device that is different than thesecond device and that is separated by a non-zero distance from thesecond device;

In response to (i) receiving the indication of second user input tocause the first device to switch to another wireless data connectionwith another device and (ii) determining that the one or more sensors onthe first device are oriented toward the third device, the first devicecan terminate the first wireless data connection between the firstdevice and the second device, and can establish a second wireless dataconnection between the first device and the third device. A secondstream of audio data can be received at the first device and over thesecond stream of audio data from the third device, and audio encoded inthe second stream of audio data can be caused to be played through theone or more speakers of the first device.

The first device can be wireless headphones and the one or more speakerscan include a left speaker and a right speaker. A determination can bemade that the one or more sensors on the first device are orientedtoward the third device, in distinction from the second device, as aresult of a user wearing the wireless headphones turning a head of theuser to face the third device.

The second device and the third device can each be selected from amongone of a smartphone, a tablet computer, a notebook computer, asmartwatch, a gaming console, a desktop computer, and a streaming musicconsole.

A second wireless data connection can be established between the firstdevice and a third device other than the second device. The secondwireless data connection can be established while maintaining the firstwireless data connection between the first device and the second deviceand in response to (i) receiving an indication of second user input, ofa different type than the user input, to cause the first device toestablish a concurrent wireless data connection with an additionaldevice and (ii) determining that the one or more sensors on the firstdevice are oriented toward the third device, a second wireless dataconnection between the first device and a third device other than thesecond device. Audio encoded in a second stream of audio data receivedat the first device over the second wireless data connection from thethird device can be caused to be played through the one or more speakersof the first device concurrently with the audio encoded in the firststream of audio data being played through the one or more speakers.

Some implementations of the subject matter described herein can includeone or more computer-readable storage devices, which may benon-transitory, and which may have instructions stored thereon that,when executed by one or more processors, cause performance ofoperations. The operations can include receiving, at a first device, anindication of user input to cause the first device to establish awireless data connection with another device; determining, at the firstdevice, that one or more sensors on the first device are oriented towarda second device; in response to (i) receiving the indication of userinput to cause the first device to establish a wireless data connectionwith another device and (ii) determining that the one or more sensors onthe first device are oriented toward the second device, establishing afirst wireless data connection between the first device and the seconddevice; receiving, at the first device and over the first wireless dataconnection from the second device, a first stream of audio data; andcausing audio encoded in the first stream of audio data to be playedthrough one or more speakers of the first device.

Some implementations of the subject matter described herein can includea wireless headphones device, or other media device that receivesstreamed content. The device can include one or more computers, one ormore speakers (or a display or other content presentation devices), apairing control, a pairing module on the one or more computers, acommunications interface, and means for determining whether at least aportion of the wireless headphones device is oriented toward a seconddevice. The pairing control can be provided on a body of the wirelessheadphones device at a location that is user accessible. Thecommunications interface can be configured to establish a wireless dataconnection for receiving audio data at the wireless headphones devicethat is streamed from the second device, the interface furtherconfigured to establish the wireless data connection in response to oneor both of (i) identifying that the user input has selected the pairingcontrol and (ii) determining that the at least the portion of thewireless headphones device is oriented toward the second device.

Some implementations of the subject matter described herein can providenone, one, or more of the following advantages. A user who wishes topair wireless headphones, or another wireless receiving device thatplays streamed media content, may quickly and easily identify a targetstreaming device that he or she would like the headphones to pair withto receive streamed media content. Rather than scrolling through a listof detected streaming devices within range of the headphones, the usermay simply turn his or her head to orient a front of the headphones at atarget streaming device of the user's choice. After confirming an intentto initiate pairing, the headphones and target streaming device mayautomatically pair with each other. Moreover, these techniques can beextended to allow a user to readily switch between multiple differentstreaming devices. For example, a user may carry multiple differentpersonal devices that stream audio or other media content, such aswearable devices, a notebook computer, a tablet computer, and asmartphone. Particular ones of these devices may be located near eachother while the user is working. To switch between audio streams fromdifferent ones of these devices, the user may tap a control on theheadphones, for example, to initiate pairing with a particular devicethat is located in front of the headphones.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1A-1E depict an example scenario of a user working on a notebookcomputer while wearing wireless headphones. The user performs variousactions in a sequence of events represented respectively by each of theFIGS. 1A-1E to control whether an audio stream is received at theheadphones from the notebook computer, from a proximately locatedsmartphone, or from both devices.

FIGS. 2A-2C depict flowcharts of an example process for pairing anaudio-receiving device with one or more audio-streaming devices based onan orientation of the audio-receiving device with respect to anaudio-streaming device, and/or based on a location of theaudio-streaming device with respect to the audio-receiving device.

FIG. 3 depicts a schematic diagram of wireless headphones that employ aninfrared illuminator and an infrared camera to obtain an identifier foran audio-streaming device located in front of the headphones when theheadphones are oriented in a direction toward the audio-streamingdevice.

FIG. 4 depicts a schematic diagram of wireless headphones that comparerespective instances of a high-frequency audio identification signalemitted by an audio-streaming device, which are detected at a pair ofmicrophones on the headphones in order to determine when theaudio-streaming device is located in front of the headphones.

FIG. 5 depicts an example wireless headphones device configured to pairwith audio-streaming devices identified based on a location and/ororientation of the wireless headphones device and an audio-streamingdevice.

FIG. 6 depicts a schematic diagram of an example computer system thatcan be used to perform the operations associated with thecomputer-implemented methods and other techniques described herein. Allor a portion of the example computer system in FIG. 6 may be implementedin an audio-receiving device, such as wireless headphones.

Like reference numbers among the drawings indicate like elements.

DETAILED DESCRIPTION

This document generally describes methods, systems, devices, and othertechniques for establishing connections with audio-streaming devices. Insome implementations, the techniques described herein can be implementedwith wireless headphones that play audio streams wirelessly transmittedfrom audio-streaming devices, such as smartphones, tablets, portablemedia players, or notebook computers. Before an audio stream can beplayed from wireless headphones, a wireless data connection generallymust be established between the headphones and an audio-streaming devicefrom which the stream originates. The process of establishing such aconnection is sometimes referred to as “pairing.” For example, wirelessheadphones paired with a smartphone may play music or other audiostreamed over a short-range wireless connection from the smartphone.This document describes various techniques by which users may readilypair wireless headphones or other audio-receiving devices with one ormore audio-streaming devices.

In some implementations, wireless headphones may be paired with astreaming device based on a set of actions taken by a user wearing theheadphones. The user actions can include a first action indicating adesire to pair the headphones, and a second action to identify a targetstreaming device to which the user desires the headphones pair.Generally, the actions may comprise gestures that are easily performedby the user, so as to reduce the effort required to pair the headphoneswith a streaming device or the effort required to switch between streamsthat originate from different devices. For example, a user wearing a setof wireless headphones may indicate an intent to initiate pairing with asmartphone by selecting a button or other type of control on an outersurface of the headphones, and turning his or her head toward thesmartphone to identify it as the streaming device with which theheadphones are to be paired. The headphones, streaming device (e.g.,smartphone), or both may be equipped with sensors and other componentsthat allow the headphones to acquire identifying information (e.g., aMAC address) for the streaming device when the streaming device islocated in front of the headphones. In some implementations, theheadphones may be capable of acquiring the identifying information, orother requisite information for pairing, only when the streaming deviceis located within a relatively narrow field of view in front of theheadphones. As such, a user may select a particular streaming devicewith which to pair, simply by looking at the particular streaming deviceso that the headphones are oriented to face the particular streamingdevice.

In some implementations, these techniques can allow a user to morenaturally switch among connections with different streaming devices. Intoday's technological environment, people frequently interact withmultiple electronic devices having wireless audio streamingcapabilities. For example, consider a user who is working in a librarywhile listening with wireless headphones to music streamed from an albumon the user's smartphone. In the midst of the work, the user finds avideo that he or she would like to watch on his or her notebookcomputer. Because it is a library and the user does not wish to disturbothers, the user may choose to play the video's audio stream through thewireless headphones. To initiate a switch in audio streams from thesmartphone to the notebook computer, the user may perform similaractions as he or she initially performed to pair the headphones with thesmartphone. For example, the user may turn his or her head toward thenotebook computer to look at the computer, and may tap a control on aside of the headphones to indicate the intent to pair with a new device.The headphones may then respond to the user's tap of the control byautomatically identifying the headphones as being oriented toward thenotebook computer, obtaining pairing information for the notebookcomputer, terminating the wireless connection with the smartphone, andestablishing a new wireless connection with the notebook computer overwhich audio may be streamed to the headphones. When the pairing processis completed between the headphones and the notebook computer, the usermay be alerted by visual or aural feedback from the headphones, notebookcomputer, or both. For example, a light on the headphones may blink orchange colors when the new device is paired, or a short audio clip(e.g., a chime) may be played by the headphones to transition from thesmartphone's audio stream to the notebook computer's audio stream.

In some implementations, the headphones may be capable of maintainingconcurrent wireless connections with multiple different streamingdevices. When paired with multiple streaming devices, the headphones mayplay a mixture of audio from each of the paired devices, or mayintermittently jump between the audio streams based on audio levels ofthe respective streams, for example, or based on other factors. Forexample, a user listening to music with wireless headphones in anairport may wish to hear announcements over the airport's PA systemwhile listening to the music, and so may initiate a simultaneousconnection with a device streaming the announcements while continuing toplay music from a smartphone or personal media player. The user mayindicate an intent to add a paired device, rather than switch to a newdevice by terminating a connection with an earlier-paired device, byproviding a different type of user input than a type used for switching.For example, tapping a control on the headphones with one finger mayindicate an intent to switch streaming devices (including terminatingconnections with any currently paired devices), whereas tapping thecontrol with two fingers may indicate an intent to create an additionalpairing with a newly identified streaming device while maintaining anyexisting pairings with other streaming devices.

As described in further detail below with respect to the figures,various techniques may be employed that allow the headphones todetermine whether the headphones are oriented in the direction of aproximately located streaming device. In some implementations, highlydirectional infrared communication can occur between the headphones andthe streaming device, which communication is effective only when an IRemitter and one or more IR sensors on respective ones of the devices arewithin a line of sight of each other. In some implementations, astreaming wireless connection can be established between amedia-receiving device and a media-streaming (transmitting) deviceautomatically based on a determination that the media-receiving devicehas one or more sensors that are oriented toward the media-streamingdevice, even without receiving an explicit indication from user inputthat a new connection is to be established. These and other techniquesare described more fully further below.

Referring now to FIGS. 1A-1E, an example scenario is depicted of asequence of events involving a user 102 working on a notebook computer106 while listening to streaming audio through a set of wirelessheadphones 104. The user 102 is working at a desk on the notebookcomputer 106, but also has other personal devices with him, including asmartphone 108. For convenience, the user has placed the smartphone 108on a surface of the desk nearby the notebook computer 106. As such, theuser may multi-task between activities on the notebook computer 106 andactivities on the smartphone 108. For example, the user may be workingin a word processor on the notebook computer 106, while periodicallychecking social media and sending text messages using his phone 108. Theuser may be working in a quiet environment, such as an office orlibrary, and therefore chooses to listen to audio through the headphones104, rather than through loud speakers that may disrupt others nearbythe user 102. In particular, the audio playing through the headphones104 may be streamed from the notebook computer 106, the smartphone 108,or both. For example, the user 102 may listen to streaming radio orsongs in a personal music library through a media application on thenotebook computer 106. However, during the course of work, the user 102may receive a voice message on the smartphone 108 to which he wishes tolisten. The systems, methods, devices, and other techniques describedherein can allow the user 102 to perform simple gestures to quickly andeasily switch from streaming audio from the notebook computer 106 to thesmartphone 108, and to switch back again to streaming from the notebookcomputer 106, for example. Moreover, the user 102 may be able to switchbetween streaming devices without accessing a menu or list of availablestreaming devices within range of the headphones 104. In someimplementations, the gestures for switching streaming devices can allowthe user to readily move between audio-based activities on differentstreaming devices, without the hassle of manually selecting a particulardevice for the headphones to pair through a menu or other list ofdevices to which the headphones may be able to pair.

Starting at FIG. 1A, the user 102 is shown wearing headphones 104 whileworking on the notebook computer 106. The dashed line 110 a runningbetween the face of the user 102 and the notebook computer 106 indicatesthat the user's gaze is directed toward the notebook computer 106. Anaudio stream 112 a currently being played through the headphones 104 isnot being streamed from the notebook computer 106, however, but isinstead being streamed from the smartphone 108. The smartphone 108 isco-located on the desk with the notebook computer 106, but is separatedfrom the computer 106 by a distance (e.g., 2-3 feet). In someimplementations, the smartphone 108 may be paired with the headphones104 through a BLUETOOTH connection, an 802.11 WI-FI connection, oranother type of wireless data connection over which audio or other mediacontent may be streamed.

In FIG. 1B, the user 102 is shown switching from the smartphone 108 tothe notebook computer 106 as the target streaming device (i.e., thestreaming device that the headphones 104 are paired with to stream audiodata). For example, the user 102 may have been listening to a streamingradio app on his smartphone 108 in FIG. 1A, but later wishes to watch aYOUTUBE video at the time represented in FIG. 1B. To switch targetdevices from the smartphone 108 to the notebook computer 106, the user102 can generally perform two actions. The first action is to provideinput to the headphones 104 to indicate that the user 102 wishes tore-pair the headphones 104 with a different streaming device. The secondaction is for the user 102 to identify a target streaming device that hewishes to pair with. Both actions can be relatively simple, and canminimize the time and effort for the user 102 to switch streams amongdifferent devices. One example of the first action by which the user 102initiates pairing with a new device is shown by the user 102 tapping asurface of a speaker housing on the headphones 104. The headphones 104may have sensors, buttons or other controls that detect when the usertaps the headphones 104. One or more processors in the headphones 104may interpret the tap as input to initiate pairing with a new targetdevice.

The second action, by which the user 102 specifies the target device towhich he would like to pair the headphones 104 with, can generally beperformed by the user turning his head to gaze at the target device ofhis choice. Being as the headphones 104 move in coordination with theuser's head when the headphones 104 are donned by the user 102, turningthe head to look at a target device also causes a front portion of theheadphones to be oriented toward the target device. The headphones 104can then be configured to identify a target streaming device that thefront portion of the headphones is oriented toward.

Various techniques can be employed that allow the headphones 104 todetect and identify a target streaming device located in front of theheadphones 104. In some implementations, for example, the headphones 104may include an infrared receiver to detect an identification signalemitted by an infrared transmitter on the streaming devices. Because theinfrared signal is generally a line-of-sight signal, the headphones mayonly detect the signal when the infrared receiver on the front portionof the headphones is oriented toward the infrared transmitter on thetarget streaming device. Other techniques may also be employed, some ofwhich are described briefly here, but are described in further detailbelow with respect to FIGS. 2A-5. For example, sound localization may beused to detect the location of a streaming device emitting anidentification signal as a high-frequency tone, or a directionalmicrophone on the headphones 104 may detect the tone when the headphones104 are oriented toward the streaming device.

In some implementations, the user 102 may first turn to look at thetarget device that he wishes to pair with before providing the firstinput to initiate pairing. As such, the headphones 104 may automaticallypair with a target streaming device that the user 102 and front portionof the headphones 104 are oriented toward at the time the user 102 tapsthe headphones 104 to initiate pairing. For example, the user 102 maycause the headphones 104 to switch from streaming audio from thesmartphone 108 to streaming audio from the notebook computer 106 bytapping the headphones 104 while the user's gaze is directed toward thenotebook computer 106 (indicated by the dashed line 110 b in FIG. 1B).As a result of the user's actions to switch a source of the streamingaudio, the audio stream 112 a from smartphone 108 is terminated, and asecond audio stream 110 b is established over a new wireless connectionbetween headphones 104 and the notebook computer 106. In some examples,the audio stream 112 a from the smartphone 108 is not only terminated,but the smartphone pauses or stops playback of media (e.g., so that thesmartphone does not suddenly start playing music over its loudspeakersand/or so that the media is paused at its current location so that theuser can later resume playback where he left off).

In some implementations, the user 102 need not be looking at the targetstreaming device at the time the user 102 taps the headphones 104 toinitiate pairing. The user 102 may instead turn to face the targetstreaming device of his choice after tapping the headphones 104. Theheadphones 104 may then pair with a target streaming device if one isidentified within a pre-defined period of time after the headphones aretapped to initiate pairing. In some implementations, the headphones 104may be configured to avoid accidental pairings that might occur as theuser 102 inadvertently glances at one or more streaming devices that hedoes not wish to pair with. For example, the user 102 may hold his headrelatively still toward a target streaming device for a period of time(e.g., 1-2 seconds) to confirm that he wishes to pair with the targetstreaming device. The headphones 104 may wait to complete pairing untilthe confirmation period has elapsed.

In some implementations, when the headphones 104 are paired with a newtarget streaming device, the headphones 104 may generate feedback toindicate to the user 102 that the headphones 104 have been paired. Forexample, a chime or other sound may be played by the headphones 104 toindicate that a new device has been paired, and/or to indicate atransition from one audio stream to another. In some implementations,the headphones 104 may generate visual feedback, such as by blinking alight emitting diode mounted on the headphones 104 upon pairing with anew device. In some implementations, the headphones 104 may vibrate toprovide haptic feedback upon pairing with a new device.

FIG. 1C next shows that the user 102 can continue to listen to audiothrough the headphones 104 streamed from the notebook computer 106, evenas the user 102 turns his head to re-direct his gaze 110 c to thesmartphone 108 (or elsewhere). Generally, the user 102 may continue towork normally and move in any direction without affecting the secondaudio stream 110 b, so long as the headphones 104 remain within acommunications range of the notebook computer 106. For example, afterindicating the target streaming device that the user 102 wishes to pairwith, the user 102 need not continue to look at the device 102 tomaintain the connection. The user 102 is free to look around and move ashe pleases within the communication range of the devices.

FIG. 1D next depicts the user 102 tapping the headphones 104 so as toswitch from streaming audio from the notebook computer 106 (stream 112b) to streaming audio from the smartphone 108 (stream 112 c). Eventhough the user 102 had previously been facing the smartphone 108 inFIG. 1C, the headphones 104 can wait to pair with the smartphone 108until user input is received to initiate pairing (e.g., tapping theheadphones 104). The headphones 104 recognize that the front portion ofthe headphones 104 is oriented toward the smartphone 108, and cantherefore identify that the smartphone 108 is the target streamingdevice with which to pair, rather than the notebook computer 106.

Lastly, FIG. 1E depicts the user 102 performing actions to establishconcurrent connections for audio streaming between (i) the headphones104 and the notebook computer 106, and (ii) the headphones 104 and thesmartphone 108. In some circumstances, the user 102 may have a need tolisten to audio originating from both the smartphone 108 and thenotebook computer 106. For example, the user 102 may be watching a videoon the notebook computer 106, but is monitoring audible alerts that areanticipated to be played by the smartphone 108 while the user 102watches the video on the notebook computer 106. The user 102 may thusestablish concurrent wireless data connections with the notebookcomputer 106 and the smartphone 108, and may stream and play audio fromboth devices 106, 108 at the same time. One example by which the user102 may establish concurrent connections is shown in FIG. 1E. Recallfrom FIG. 1D that, in the time leading up to the event depicted in FIG.1E, the headphones were paired only with the smartphone 108, and anaudio stream 112 c provided audio from the smartphone 108 to be playedat the headphones 104. In contrast, in FIG. 1E, the user 102 has turnedhis head away from the smartphone 108 and toward the notebook computer106 (indicated by dashed line 110 e). The existing audio stream 112 cfrom the smartphone 108 can be maintained without interruption, in someimplementations. The user 102 then taps the side of the headphones 104with two fingers, rather than the single finger that was used to tap theheadphones 104 in FIGS. 1B and 1D. The two-finger tap may bedifferentiated by the headphones 104 from a single-finger tap, as eachtype of input may be associated with a different function on theheadphones 104. For example, the single-finger tap may comprise userinput to cause the headphones to switch streaming devices, in which caseany existing audio streams may be suspended or terminated in favor of anaudio stream for a newly identified target streaming device. Thetwo-finger tap, in contrast, may comprise user input to cause theheadphones 104 to pair an additional streaming device to streamconcurrently with streams from other, previously-paired streamingdevices. In some implementations, separate user-selectable controls maybe provided on the headphones 104 that are each configured to perform arespective function, such as switching connections among differentstreaming devices or adding a concurrent stream from a newly paireddevice to existing streams from other devices. In response to the user'stwo-finger tap, the headphones 104 pair with the notebook computer 106,and establish a new audio stream 112 d from the notebook computer 106while maintaining an audio stream 112 c from the smartphone 108.Although not shown, the headphones 104 may be capable of concurrentlystreaming audio from 3, 4, 5 or more devices in some implementations.The headphones 104 may provide a blended output so that each speaker ofthe headphones is playing both audio streams 112 c and 113 at the sametime. The headphones 104 may provide a segregated output so that a firstspeaker of the headphones is playing the audio stream 112 c and a secondspeaker of the headphones is playing the audio stream 112 d.

Referring to FIGS. 2A-2C, a flowchart is shown of an example process 200for pairing a receiving device with one or more media-streaming devices.The process 200 is discussed by way of example with respect to ascenario in which the receiving device is an audio-receiving device(e.g., wireless headphones) and the streaming devices stream audiocontent (e.g., music, podcasts, or video audio). In someimplementations, however, the process 200 may be applied in otherscenarios to stream other types of media content, such as video, images,text, or a combination of these. In some implementations, the process200 may be carried out with the systems, devices, and other techniquesdescribed in this document, such as the audio-streaming system 500 ofFIG. 5, and/or the example computing system 600 of FIG. 6.

The process 200 can begin at stage 202, where an audio-receiving devicereceives input indicating that a user wishes to pair the receivingdevice with an audio-streaming device. In some implementations, the userinput may be received while the receiving device is not yet paired withany streaming device, in which case the input can be to cause thereceiving device to establish an initial pairing. In someimplementations, the user input may be received while the receivingdevice is already paired with at least one streaming device. In thiscase, the user input may indicate whether to switch connections from thepreviously paired streaming device to a different streaming device, orwhether to establish an additional connection with a new streamingdevice while maintaining connections with any previously paired devices.As described in further detail below, different types of user input mayindicate whether to switch connections or to establish connections withmultiple streaming devices.

In some implementations, the user input may be in the form of the usercontacting a surface of the audio-receiving device to indicate a desireto initiate a pairing with a streaming device. For example, wirelessheadphones may be equipped with one or more controls on a surface of theheadphones that may be selected by the user to initiate pairing. Thecontrol may be a physical button, such as a mechanical pushbutton, atouch-sensitive control (e.g., a capacitive button), a switch, a dial,or a combination of these, in some examples. The control may generallybe disposed on the headphones at a location that is easily accessible toa user when the headphones are in use and worn by the user, such as on ahousing of one of the speakers on the headphones. In someimplementations, the control may be arranged so as to provide tactilefeedback to the user to indicate that the user is contacting the controland/or to indicate when the user has the made a selection of the controlto initiate a pairing.

In some implementations, other forms of user input may be employed, inaddition or alternatively to tactile selection of a control on theaudio-receiving device, to cause the audio-receiving device to pair withan audio-streaming device. For example, the user may provide inputthrough a separate device (e.g., a personal computer or smartphone)distinct from the audio-receiving device to initiate pairing. Theseparate device may communicate an indication of the user input to theaudio-receiving device, which in turn can respond by automaticallytaking action to pair with an audio-streaming device. As anotherexample, wireless headphones may be equipped with accelerometers orother sensors to detect motion of the headphones. A user wearing theheadphones may then nod or perform another gesture that the headphonesare configured to recognize as being a pairing gesture. As anotherexample, the user may provide a voice command (e.g., “pair with newdevice”) as input to designate an intent to pair with a new device ormultiple devices concurrently.

At stage 204, the audio-receiving device identifies a firstaudio-streaming device that at least a portion of the audio-receivingdevice is oriented toward. In subsequent stages of the process 200, theaudio-receiving device may then pair with the first audio-streamingdevice as a result of the portion of the audio-receiving device beingoriented to face the first audio-streaming device. In this manner, thefirst audio-streaming device can be easily identified without a need forthe user to access a list of available streaming devices, and select thefirst audio-streaming device from the list. Rather, the approachdescribed herein may allow users to quickly identify streaming devicesto pair with, and to quickly switch connections between proximatelylocated streaming devices. For example, university students, businessprofessionals, and others often carry multiple devices—such as asmartphone and a notebook computer—that are each capable of streamingaudio. At any given time, a user may have a need to switch fromstreaming audio from a first of his or her devices to a second of his orher devices. The user may have both devices set near each other at aworkstation, for example. If the user is wearing wireless headphones,the user may then simply tap a control to initiate pairing, and turn hisor her head so that sensors on a front side of the headphones areoriented toward the target device to which he or she desires to pair.Generally, the amount of effort involved for a user to pair theheadphones with a streaming device can be fairly minimal. Of course, insome implementations and depending on the configuration of a givenstreaming device, the user may still be required to select a control onthe streaming device in order to place the streaming device in a pairingmode to make the device available to be paired with the headphones orother receiving device. In some implementations, the streaming devicemay present a prompt that requires further user input to pair with theheadphones (e.g., “Press this button to pair with the headphones”). Insome implementations, no user action may be required to place thestreaming device into a pairing mode.

In some implementations, the audio-receiving device may pair with asystem as a result of the audio-receiving device being oriented towardsa label or device that identifies the audio-streaming device, while theaudio-streaming device may be located elsewhere. For example, supposethat an airport had a sign that read “Look here to pair with airportannouncements,” and that had a barcode for pairing with the airportannouncement system or an electronic transmitter that transmitted a codefor pairing with the airport announcement system. In both cases, theairport announcement system may be located elsewhere (e.g., up in theceiling), but the user may be able to pair with that system by orientingthe headphones toward the sign.

The audio-receiving device can be identified at a time proximate to atime when the user input is received to initiate pairing with anaudio-streaming device. In some implementations, the audio-receivingdevice may attempt to discover an audio-streaming device to pair with inresponse to receiving the user input to initiate pairing. For example, auser may tap the side of his or her headphones to initiate pairing,which in turn triggers the headphones to search for an audio-streamingdevice to establish a connection with. The headphones may monitor, for aperiod of time after receiving the user input to initiate pairing,signals detected by one or more sensors on the headphones until anaudio-receiving device is identified as a result of the headphones beingturned to face the audio-streaming device. The headphones, streamingdevice, or both may emit line-of-sight signals, for example, that may bedetectable only when the devices are within a path of the line of sightsignal and when at least one of the devices is oriented toward theother. A computer on the headphones may determine whether aline-of-sight signal emitted from an audio-streaming device is detectedwithin the period of time (e.g., 5 seconds) from receipt of the userinput. If so, the headphones may use the detected signal to pair withthe audio-streaming device from which the signal was emitted. If nosignal is detected within the period of time, then the headphones maycease searching for a streaming device to pair with, and may providevisual, aural, and/or haptic feedback to the user to indicate thatpairing was unsuccessful.

In some implementations, rather than waiting for receipt of user inputto begin searching for an audio-streaming device to pair with, theaudio-receiving device may periodically or continuously monitor itssurroundings so that an audio-streaming device toward which theheadphones are oriented may already have been identified by the timethat user input is received to initiate pairing.

In some implementations, the audio-receiving device can obtain anidentifier for the first audio-streaming device based on a signaldetected as a result of being oriented toward the first audio-streamingdevice. The identifier may be a unique code assigned to the firstaudio-streaming device, or may be any other type of information thatidentifies the first audio-streaming device. The identifier may beusable by the audio-receiving device to pair with the firstaudio-streaming device. For example, the identifier may be a MAC addressassigned to the audio-streaming device. The MAC address may then be usedin some protocols (e.g., BLUETOOTH protocols) for an audio-receivingdevice to pair with the audio-streaming device. In some implementations,the identifier may be encoded in a signal (e.g., a line of sightsignal), that the audio-receiving device is configured to detect when atleast a portion of the receiving device is oriented toward theaudio-streaming device, but not when the portion of the receiving deviceis oriented away from the audio-streaming device. For example, a MACaddress of the audio-streaming device may be encoded in an infrared datasignal (e.g., IRdA) emitted by the audio-streaming device, which may bedetected by an infrared receiver on the audio-receiving device.

Various technologies may be employed for the audio-receiving device torecognize when at least a portion of the streaming device is orientedtoward an audio-streaming device, and to obtain an identifier for theaudio-streaming device. A number of implementations involving thesevarious technologies are described in further detail in the followingparagraphs.

First, the audio-streaming device may be identified in someimplementations by an infrared (IR) receiver disposed on a portion ofthe audio-receiving device. The IR receiver may be configured to detectan IR data signal emitted by an IR transmitter on the audio-streamingdevice. The IR transmitter may be arranged to emit a directedline-of-sight identification signal. The IR receiver on theaudio-receiving device may then detect the line-of-sight signal when theIR receiver is located within a path of the IR signal, and when the IRreceiver on the audio-streaming device is oriented toward the IRtransmitter on the audio-streaming device. For example, an IR receivermay be disposed on a surface of a set of wireless headphones in alocation that allows the IR receiver to detect an IR signal emitted by astreaming device located in front of the wireless headphones. The bitrate of an IR data signal emitted by the audio-streaming device may besufficiently high (e.g., 2.4 kbits/second) to make transmission of a MACaddress or other identifier of the streaming device occur in such ashort period of time so as to not introduce noticeable delay to the userduring the pairing process. In some implementations, other frequenciesof electromagnetic signals may be used other than IR. For example,ultraviolet (UV) transmitters and receivers may be employed rather thanor in addition to IR transmitters and receivers.

Second, the audio-streaming device may be identified in someimplementations by passive IR techniques, which do not rely on active IRemitters at the audio-streaming devices. In these implementations, areflective component may be affixed to any audio-streaming device towhich the user may desire to pair. A unique identifier for theaudio-streaming device may be printed on the reflective component, suchas a barcode or a QR code. For example, a sticker having a uniqueidentifier may be pressed onto streaming devices that a user mayfrequently use, such as a smartphone, tablet computer, notebookcomputer, and more. To read the identifier, the audio-receiving devicemay be provided with a camera or other image sensor that detects animage of the barcode, QR code, or other identifier. The image of thecode may then be processed to read the identifier at the audio-receivingdevice. In some implementations, a retroreflective component (e.g., asticker) may be attached to the audio-streaming device. The identifieron the retroreflective component may be invisible to the human eye, butmay be detectable by sensors that detect certain types ofelectromagnetic radiation, such as infrared or ultraviolet. For example,wireless headphones may be equipped with an IR illuminator and an IRcamera, which may respectively illuminate and capture images of theidentifier printed on the retroreflective component.

In some implementations, the audio-receiving device may be equipped witha camera that is sensitive to light in the visible spectrum, such aslight that can be seen by human eyes. The camera may capture images orvideo of an identifier (e.g., a barcode or QR code) printed on theaudio-streaming device or otherwise associated with or affixed to theaudio-streaming device. The identifier in the captured images or videomay then be recognized and used to establish a wireless data connectionbetween the audio-receiving device and the audio-streaming device.

FIG. 3 shows an example configuration of a set of wireless headphones300 that use an IR camera 306 and IR illuminator 308 to identify anaudio-streaming device 310 toward which the headphones 300 are oriented.The audio-streaming device 310 includes an identifier on aretroreflective component 312, which may be attached to a surface of thestreaming device 310. Although in the example of FIG. 3, the camera 306and illuminator 308 are located proximate to different speakers 302, 304on the headphones 306, in some implementations the camera 306 andilluminator 308 may be co-located on one of the speakers 302, 304 orelsewhere on the headphones 306. The IR illuminator 308 can include oneor more IR lights arranged to illuminate a region in front of theheadphones 300. Because the illuminator 308 is positioned on the rightspeaker 304 at a location offset from a center of the headphones 300,the illuminator 308 may be angled to illuminate a region in front of theheadphones 300. Similarly, the IR camera 306 may be angled toward theregion in front of the headphones 300 in order to scan the identifierfrom the retroreflective component 312 when the retroreflectivecomponent 312 is positioned in front of the headphones 300 within theshine of the illuminator 308. In this manner, the IR camera 306 candetect the identifier when the audio-streaming device 310 is located infront of the headphones 300. Moreover, because the illuminator 308 emitslight in the infrared region, the illumination may be invisible to thehuman eye. One advantage to the passive IR configuration exemplified inFIG. 3 is that the retroreflective component 312 can be easily attachedto an audio-streaming device 310 during manufacture of the device 310,or may be attached after-market by the owner of the device 310 withrelatively low expense and effort.

FIG. 4 depicts one example of another approach (scheme) by which anaudio-receiving device may identify an audio-streaming device as beinglocated in front of at least a portion of the audio-receiving device.The approach in FIG. 4 generally uses sound localization techniques todetermine a location of an audio-streaming device relative to anaudio-receiving device. Based on one or more characteristics of an audiosignal emitted by the audio-streaming device, the audio-receiving devicecan determine the relative location of the audio-streaming device. Inparticular, differences among the audio signal as detected by two ormore microphones disposed at separate locations on the audio-receivingdevice may indicate the location of the audio-streaming device relativeto the audio-receiving device (or relative to a portion of theaudio-receiving device).

In the example of FIG. 4, a set of wireless headphones 400 includes apair of microphones 406, 408 for detecting an audio-based identificationsignal emitted by a speaker 412 of an audio-streaming device 410. Theidentification signal emitted by the speaker 412 may be encoded with anidentifier for the audio-streaming device 410, such as a BLUETOOTH MACaddress that has been uniquely assigned to the audio-streaming device410. In some implementations, the MAC address or other identifier may bemodulated on a high frequency tone emitted by the speaker 412, such thatthe identification signal is above the hearing range of most people(e.g., above 20 kHz). A first microphone 406 among the pair ofmicrophones 406, 408 may detect a first portion of the identificationsignal from the audio-streaming device 410 arriving at the right speakerof the headphones 400, while a second portion of the identificationsignal from the audio-streaming device 410 arriving at the left speakerof the headphones 400 may be detected by the second microphone 408. Oneor more computers on the headphones 400 may then compare the respectiveportions of the identification signal detected by the first and secondmicrophones 406, 408, respectively, to determine the relative locationof the audio-streaming device 412 relative to the headphones 400. Due tothe separation of the first microphone 406 on the right speaker 404 ofthe headphones 400, and the second microphone 408 on the left speaker402 of the headphones 400, differences in the respectively detectedportions of the audio signal can be determined that indicate therelative location of the audio-streaming device 410. As the distancethat the audio signal must travel from the speaker 412 to one of themicrophones 406, 408 increases, the amplitude of the signal may becomemore attenuated. Moreover, the transmission delay for the sound to reacheither of the microphones 406, 408 may increase as the distance betweenthe speaker 412 and the microphones 406, 408 increases. As such,differences among the amplitudes and time delays of the portions of theaudio-based identification signal detected by the first and secondmicrophones 406, 408 may indicate whether the audio-streaming device 410is located closer to the first microphone 406 or the second microphone408. When the differences in the amplitudes, time delays, or both fallbelow a threshold difference, then the headphones 400 may determine thatthe streaming device 410 is centrally located between the left and rightspeakers 402, 404 of the headphones 400, and that the front of theheadphones 400 are oriented in a direction facing the streaming device410. The headphones 400 may then respond by using the identifier encodedin the audio-based identification signal to pair with theaudio-streaming device 410, if the user has indicated an intent toinitiate pairing. In some implementations, three, four, five, or moremicrophones may be spaced at various locations of the headphones 400,and differences among the audio-based identification signal detected ateach of the headphones may be determined, so as to identify the locationof an audio-streaming device 410 with even greater accuracy.

In some implementations, other sound-based identification techniques maybe used, additionally or alternatively to sound localization techniques,to identify a streaming device that the audio-receiving device isoriented toward. For example, the streaming device may have a speakerthat emits a high-frequency tone encoded with an identifier for thestreaming device (e.g., an identification signal like that emitted byspeaker 412). The tone may generally be emitted omni-directionally, ormay be directed in one or more particular directions. In order to detectthat the streaming device is located in front of the receiving device,or in front of a portion of the receiving device, the receiving devicemay have a directional microphone that is sensitive to sound emanatingfrom in front of the microphone, but that is substantially insensitiveto sound emanating from other directions. The microphone can beconfigured on the receiving device to detect the high-frequencyidentification signal from the streaming device when the receivingdevice is oriented toward the streaming device. Moreover, if multipleaudio-streaming devices are located in proximity of each other and eachemits a respective identification signal detected by the microphone ofthe audio-receiving device, a target device can be selected to pair withbased on characteristics of the respective signals. For example, thestreaming device whose signal has the highest intensity may be selectedfor pairing under the expectation that the highest intensity signalemanates from the streaming device that the receiving device is mostdirectly oriented toward.

In some implementations, the audio-streaming device may periodically orcontinuously emit the high-frequency audio identification signal. Inthis manner, the signal may constantly be available for detection by theaudio-receiving device whenever the user desires to pair with anaudio-streaming device. Of course, constantly repeating emissions can beundesirable in some situations, such as where it is desired to minimizethe power consumption of the streaming device. Therefore, in someimplementations, the streaming device may be configured to emit itsidentification signal only upon request. For example, theaudio-receiving device may have a speaker which, in response to userinput to initiate pairing, emits an activation signal to cause anystreaming devices within range of the audio-receiving device to beginemitting their respective identification signals. In someimplementations, the activation signal may be a high-frequency audiosignal (e.g., above 20 kHz) that is played through one or more speakersof the audio-receiving device. The streaming devices may then havemicrophones that detect the activation signal, and may respond to theactivation signal by emitting an audio, infrared, or other type ofidentification signal according to any of the implementations describedherein. In some implementations, the activation signal may be encodedwith identifiers for streaming devices that have previously registeredwith the receiving device, so that the activation signal only activatesparticular devices that belong to a particular user. Streaming devicesthat may be in range of the activation signal, and which may belong toother users for example, may ignore the activation signal if theirrespective identifiers are not contained in the signal (e.g., bychoosing to not emit an identification signal in response to theactivation signal).

Referring again to FIG. 2A, after identifying an audio-receiving devicetoward which the first audio-streaming device is oriented (stage 204),the process 200 of pairing the receiving device with the first streamingdevice continues. At stage 208, the receiving device and the firststreaming device can establish a first wireless data connection. Thedata connection can generally be configured to allow for transmission ofstreaming audio data (e.g., music or speech) from the streaming deviceto the receiving device. In some implementations, the data connectioncan be made according to a pre-defined communications protocol such asBLUETOOTH. The connection may be automatically established uponreceiving the indication of user input to initiate pairing andidentification of the first audio-streaming device. In someimplementations, the identifier for the first audio-streaming device canbe used, along with any other applicable registration information, toestablish the data connection. However, because the receiving device mayhave obtained the identifier or other applicable registrationinformation from signals outputted or reflected by the firstaudio-streaming device, no additional user input may be required for thedata connection to be established. Upon establishing the wirelessconnection, any audio being played by the first audio-streaming devicecan be streamed to the receiving device at stage 210. The receivingdevice can then process the stream and convert the encoded audio datainto a raw audio signal that is played through one or more speakers ofthe receiving device at stage 212. In some implementations, the speakersof the receiving device may be integrated components in an assembly ofthe receiving device, such as the left and right speakers of set ofwireless headphones. In some implementations, the speakers of thereceiving device may be external to at least a portion of theaudio-receiving device, such as standalone speakers that are connectedto a central portion of the audio-receiving device via speaker wires.

While paired and playing audio streamed from the first audio-streamingdevice, at stage 214 the audio-receiving device receives second userinput to initiate pairing with another audio-streaming device. Becausethe receiving device is already paired with the first audio-streamingdevice, the user input may indicate how the new streaming device shouldbe paired and whether to maintain the first wireless connection with thefirst audio-streaming device. In some implementations, a first type ofuser input may indicate that the user intends to switch connections fromthe first audio-streaming device to a second audio-receiving device.Switching connections can involve automatically terminating the firstwireless data connection between the receiving device and the firstaudio-streaming device, and establishing a new connection with thesecond audio-streaming device. Even if the first wireless dataconnection is not terminated, switching can at least involve ceasing toplay audio streamed from the first audio-streaming device andestablishing the new connection with the second audio-streaming deviceto play audio streamed from the second device. In some implementations,a second type of user input may indicate that the user would like to adda second wireless data connection with a second streaming device on topof the first connection with the first streaming device. In other words,the second type of user input may be to cause the audio-receiving deviceto pair with multiple streaming devices so that respective audio streamsfrom each of the streaming devices may be played concurrently by theaudio-receiving device. For example, a user who is on hold during atelephone call may wish to listen to music from another streaming deviceuntil the call becomes active again. In order to monitor when the holdperiod ends and the call is again active, the user may cause thereceiving device to be simultaneously paired with both phone and aseparate device streaming the user's music.

At stage 216, the audio-receiving device determines which action isindicated by the second user input. If the second input is to cause thereceiving device to switch connections from the first audio-streamingdevice to a second audio-streaming device, the process 200 continues tothe flowchart depicted in FIG. 2B. On the other hand, if the secondinput is to cause the receiving device to add a second connection on topof the existing connection with the first streaming device, the process200 continues to the flowchart depicted in FIG. 2C. As previouslymentioned, different types or forms of user input may indicate whichpath to follow. For example, separate buttons or other controls may bedisposed on a housing of the audio-receiving device for switchingdevices and for pairing with additional devices. Selection of a firstsuch control may cause the audio-receiving device to terminate the firstconnection with the first audio-receiving device and to establish a newconnection with a second audio-receiving device. Selection of a secondsuch control may cause the audio-receiving device to maintain the firstconnection with the first audio-receiving device while pairing with anadditional streaming device. In some implementations, different gesturesfrom the user may indicate which path to follow. For example, a set ofwireless headphones may have a touch sensitive surface on the housing ofone of the speakers of the headphones. Tapping the surface of theheadphones with a single finger may indicate that the headphones shouldswitch streaming sources, whereas tapping the surface of the headphoneswith two fingers may indicate that the headphones are to pair with anadditional device simultaneously as the connection is maintained withthe first audio-streaming device. In some implementations, the wirelessheadphones or other audio-receiving device may have accelerometers,microphones, or other sensors that can detect when a housing of thereceiving device is tapped. The user can then perform different numbersof taps in succession to indicate whether switching or multipleconnections is desired. For example, a single tap may be to cause theheadphones to switch connections among streaming devices, and adouble-tap may be to cause the headphones to pair with another streamingdevice concurrently with the first streaming device.

If the second user input was to switch connections among streamingdevices, the process 200 continues as shown in FIG. 2B. At stage 218,the audio-receiving device identifies a second audio-streaming devicelocated in front of the receiving device that at least a portion of thereceiving device is oriented toward. The second audio-streaming devicecan be identified according to any of the techniques that the firstaudio-streaming device was identified at stage 204, including thetechniques discussed with respect to FIGS. 3 and 2, for example. Toswitch connections, the audio-receiving device then terminates the firstwireless connection (stage 222), establishes a new wireless connectionwith the second audio-streaming device (stage 224), receives a secondstream of audio data over the new wireless connection from the secondaudio-streaming device (stage 226), and plays audio from the secondstream through one or more speakers of the audio-receiving device (stage228).

If the second user input was to pair with an additional streamingdevice, rather than to switch connections among streaming devices, theprocess 200 continues from stage 216 in FIG. 2A to stage 230 in FIG. 2C.At stage 230, the audio-receiving device identifies a thirdaudio-streaming device located in front of the receiving device that atleast a portion of the receiving device is oriented toward. The thirdaudio-streaming device can be identified according to any of thetechniques that the first audio-streaming device was identified at stage204, including the techniques discussed with respect to FIGS. 3 and 2,for example. To establish multiple connections, the audio-receivingdevice establishes a third wireless data connection with the thirdaudio-receiving device (stage 234), while maintaining the first wirelessdata connection with the first audio-streaming device (stage 236). Thereceiving device can then begin receiving a third stream of audio dataover the third wireless connection (stage 238), and can simultaneouslyplay streamed audio from both the first and third audio-streamingdevices (stage 240). In some implementations, the user may be able toindependently adjust the volume levels of each audio stream, and/or maybe able to mute one stream while the other stream continues to beplayed.

The process 400 has been described by way of example with respect tostreaming audio. In some implementations, the process 400 may be carriedout with devices that stream other types of media content as well, suchas video, images, text, or a combination of these. For example, thereceiving device may be a portable video playing device that include aliquid crystal display (LCD) or other type of electronic display, andmay be configured to play video received from a video streaming device.A user of the portable video playing device may orient a portion of thedevice to face a target streaming device that the user would like thevideo playing device to pair with, and the video playing device mayidentify the streaming device accordingly. In some implementations, thepresentation components of the receiving device may not be integrated inthe receiving device itself, but may instead be external to thereceiving device and in wired or wireless communication with thereceiving device. For example, the receiving device may be a remotecontrol for selecting a streaming device to connect to an input channelof a home entertainment system. For example, the user may point theremote control at a smartphone, laptop, or other streaming device thathe or she would like to play through speakers and/or a display of thehome entertainment system, and may press a pairing button on the remotecontrol to pair a receiver of the home entertainment system (which maybe the remote control itself or a separate device) with the targetstreaming device that the remote control is pointed at. Pairing may thenbe carried out according to the methods, systems, devices, and othertechniques described in this document. For example, the remote controlmay detect an infrared or other line of sight identification signal fromthe target streaming device to obtain an identifier from the targetstreaming device. The identifier may then be used to pair the receiverwith the target streaming device. If the receiver is separate from theremote control, the remote control may transmit the identifier and anyother information about the target streaming device to the receiver foruse in the pairing process.

FIG. 5 depicts an example system 500 of wireless headphones device 502configured to pair with audio-streaming devices 504 a, 504 b based on alocation and/or orientation of the headphones 502 and the streamingdevices 504 a, 504 b. In some implementations, the headphones 502 may beused to carry out the techniques described with respect to FIGS. 1A-4.The headphones 502 may also include a computer system, or a portion of acomputer system, like that depicted in FIG. 6. For example, theheadphones 502 may include one or more processors arranged to identifytarget streaming devices, to perform pairing, and to stream audioaccording to any of the techniques described herein. Moreover, althoughFIG. 5 depicts wireless headphones 502 as an example wireless receivingdevice, it should be appreciated that similar arrangements may also beapplied to other types of wireless receiving devices, such as wearabledevices and loud speakers.

The headphones 502 are generally configured to pair with audio-streamingdevices that have been identified based on an orientation and/orlocation of the headphones 502 relative to the audio-streaming devices.The headphones 502 may include a pair of speakers 506, a wirelesscommunications interface 508, a pairing control 510, a pairing manager512, and pairing hardware 520. Some implementations may includeparticular combinations, but not all, of these components.

The headphones 502 can play streamed audio through the pair of speakers506. The wireless communications interface 508 may be configured toestablish a wireless data connection with one or both of theaudio-streaming devices 504 a, 504 b, such as a BLUETOOTH wirelessconnection. An audio stream can be transmitted over the wirelessconnection, and the transmitted audio stream can be received andprocessed by the wireless communications interface 508.

The headphones 502 can further include a pairing control 510. Thepairing control 510 may be selected by the user to initiate pairing withan audio-streaming device 504 a or 504 b. For example, the pairingcontrol 510 may be a button, a switch, or a dial. The pairing control510 may be mechanically actuated, and/or may be a touch-sensitivecomponent (e.g., a single capacitive or resistive touch-sensitive buttonor an array of multiple touch sensors). In some implementations, thepairing control 510 may be located on an exterior surface of theheadphones 502 to allow the user to easily contact the control 510 toinitiate pairing. The pairing control 510 may be arranged to distinguishbetween different types of user input, in some implementations. Forexample, the pairing control 510 may include a first portion that, whencontacted by the user, causes the headphones 502 to switch audio streamsby terminating an existing wireless connection with one device andpairing with a newly identified streaming device. A second portion ofthe pairing control 510, in contrast, may be contacted to cause theheadphones 502 to pair with a newly identified device while maintainingany existing connections with other streaming devices. In someimplementations, the pairing control 510 may distinguish different formsof user input to determine a function to perform in response to the userinput. For example, a single tap on the pairing control 510 may indicatethat the user wishes to switch connections, whereas a double tap on thepairing control 510 may indicate that the user wishes to establishconnections for streaming from multiple devices.

The pairing manager 512 of the headphones 502 is operable to establishand terminate wireless data connections with one or more streamingdevices 504 a, 504 b. In some implementations, the pairing manager 512can include a connection module 514, an identification module 516, andan activation module 518. The connection module 514 may host theBLUETOOTH protocol or other protocol for making wireless dataconnections, and may coordinate with the wireless communicationsinterface 508 to establish, maintain, and pair with the audio-streamingdevices 504 a, 504 b. The identification module 516 is configured tocoordinate with one or more sensors or other pairing hardware 520 on theheadphones 502 to determine when a front portion of the headphones isoriented toward one of the audio-streaming devices 504 a, 504 b, and toobtain an identifier for the target audio-streaming device that isusable by the headphones 502 to pair with the target audio-streamingdevice. In some implementations, the audio-streaming devices 504 a, 504b may need to be placed in a pairing mode in order to be paired with.

In some implementations, the audio-streaming devices 504 a, 504 b may bemanually placed into the pairing mode by the user selecting a pairingcontrol 524 on the streaming devices 504 a, 504 b. In someimplementations, to avoid the need for the streaming devices 504 a, 504b to be manually placed into the pairing mode, the streaming devices 504a, 504 b may listen for an activation signal from the headphones 502.The activation signal can be generated by the activation module 518. Thesignal may be an electromagnetic signal and/or an audio signal (e.g., ahigh-frequency tone) in some implementations. When the audio-streamingdevices 504 a, 504 b detects the activation signal, the audio-streamingdevices may automatically transition into pairing mode, and may emit anidentification signal. The identification signal may include a MACaddress or other unique identifier for the corresponding streamingdevice 504 a, 504 b from which the signal is emitted. The identificationsignal may be detected by the pairing hardware 520 on the headphones502. The form of the identification signal may depend on the scheme theidentification scheme employed by the headphones 502 and audio-streamingdevices 504 a, 504 b. Any of the identification schemes discussed hereinmay be employed. For example, an infrared signal containing anidentifier for the audio-streaming device 504 a or 504 b may betransmitted to the headphones 502, or sound localization techniques maybe used by the headphones 502 to detect a high-frequency audio toneencoded with an identifier for one of the audio-streaming devices 504 a,504 b. The headphones 502 may be equipped with appropriate hardware 520,such as microphones, infrared illuminators, and/or infrared receiversdepending on the particular identification schemed employed.

Each of the streaming devices 504 a, 504 b may include hardware andsoftware to wirelessly stream audio content to the headphones 502. Insome implementations, the streaming devices 504 a, 504 b may bepre-configured by the device manufacturers with capabilities for pairingwith the headphones 502. For example, the devices 504 a, 504 b mayinclude a built-in infrared transmitter to emit an identification signalto the headphones 502 for pairing. In some implementations, thestreaming devices 504 a, 504 b may not be especially adapted for thepairing techniques discussed in this document, but may be adapted forsuch purpose in the after-market. For example, a user may attachretroreflective stickers with a barcode or other identifier onto thehousings of the streaming devices 504 a, 504 b, which can be illuminatedby an infrared light source on the headphones 502 and detected by aninfrared camera on the headphones 502.

In some implementations, the streaming devices 504 a, 504 b may eachinclude a wireless communications interface 522 to wirelesslycommunicate with the headphones 502. The devices 504 a, 504 b may alsoinclude a pairing control that the user may select to place the devices504 a, 504 b into a pairing mode in which the devices 504 a, 504 b emitan identification signal that identifies the respective devices 504 a,504 b and that indicates the devices 504 a, 504 b are available to bepaired. A streaming service 526 on the devices 504 a, 504 b may providemusic or other content to be streamed. For example, the streamingservice 526 may be a media player application, a podcast player, or astreaming radio application. The pairing manager 528 on the streamingdevices 504 a, 504 b may coordinate the process of pairing with theheadphones 502. For example, the pairing manager 528 may generate anidentification signal when the devices 504 a, 504 b are placed intopairing mode. The identification signal may include a unique deviceidentifier 532 that has been assigned to the corresponding device 504 aor 504 b. Finally, the streaming devices 504 a, 504 b may includeappropriate pairing hardware 530 to emit the identification signal thatcan be detected by the headphones 502 during the pairing process. Theparticular pairing hardware 502 on a given streaming device 504 a, 504 bmay vary according to the scheme used by the headphones 502 to detectwhen the front of the headphones 502 is oriented toward one of thestreaming devices 504 a, 504 b. For example, in one scheme, thestreaming devices 504 a, 504 b may have an infrared transmitter. Inanother scheme, the streaming devices 504 a, 504 b may have a speakerfor emitting a high-frequency identification tone.

FIG. 6 is a schematic diagram of a computer system 600. The system 600can be used to carry out the operations described in association withany of the computer-implemented methods or other techniques describedpreviously, according to some implementations. The system 600 isintended to include various forms of digital computers, such as laptops,desktops, workstations, personal digital assistants, servers, bladeservers, mainframes, and other appropriate computers. The system 600 canalso include mobile devices, such as personal digital assistants,cellular telephones, smartphones, and other similar computing devices.In some implementations, the system 600 can include wireless receivingdevices such as wireless headphones, or media-streaming devices such assmartphones or computers. For example, all or portions of the system 600may be provided in a set of wireless headphones and may be configured tocommunicate with an audio streaming device, to perform pairingoperations, and to process streamed audio content. Additionally thesystem can include portable storage media, such as, Universal Serial Bus(USB) flash drives. For example, the USB flash drives may storeoperating systems and other applications. The USB flash drives caninclude input/output components, such as a wireless transmitter or USBconnector that may be inserted into a USB port of another computingdevice.

The system 600 includes a processor 610, a memory 620, a storage device630, and an input/output device 640. Each of the components 610, 620,630, and 640 are interconnected using a system bus 650. The processor610 is capable of processing instructions for execution within thesystem 600. The processor may be designed using any of a number ofarchitectures. For example, the processor 610 may be a CISC (ComplexInstruction Set Computers) processor, a RISC (Reduced Instruction SetComputer) processor, or a MISC (Minimal Instruction Set Computer)processor.

In one implementation, the processor 610 is a single-threaded processor.In another implementation, the processor 610 is a multi-threadedprocessor. The processor 610 is capable of processing instructionsstored in the memory 620 or on the storage device 630 to displaygraphical information for a user interface on the input/output device640.

The memory 620 stores information within the system 600. In oneimplementation, the memory 620 is a computer-readable medium. In oneimplementation, the memory 620 is a volatile memory unit. In anotherimplementation, the memory 620 is a non-volatile memory unit.

The storage device 630 is capable of providing mass storage for thesystem 400. In one implementation, the storage device 630 is acomputer-readable medium. In various different implementations, thestorage device 630 may be a floppy disk device, a hard disk device, anoptical disk device, or a tape device.

The input/output device 640 provides input/output operations for thesystem 400. In one implementation, the input/output device 640 includesa keyboard and/or pointing device. In another implementation, theinput/output device 640 includes a display unit for displaying graphicaluser interfaces.

The features described can be implemented in digital electroniccircuitry, or in computer hardware, firmware, software, or incombinations of them. The apparatus can be implemented in a computerprogram product tangibly embodied in an information carrier, e.g., in amachine-readable storage device for execution by a programmableprocessor; and method steps can be performed by a programmable processorexecuting a program of instructions to perform functions of thedescribed implementations by operating on input data and generatingoutput. The described features can be implemented advantageously in oneor more computer programs that are executable on a programmable systemincluding at least one programmable processor coupled to receive dataand instructions from, and to transmit data and instructions to, a datastorage system, at least one input device, and at least one outputdevice. A computer program is a set of instructions that can be used,directly or indirectly, in a computer to perform a certain activity orbring about a certain result. A computer program can be written in anyform of programming language, including compiled or interpretedlanguages, and it can be deployed in any form, including as astand-alone program or as a module, component, subroutine, or other unitsuitable for use in a computing environment.

Suitable processors for the execution of a program of instructionsinclude, by way of example, both general and special purposemicroprocessors, and the sole processor or one of multiple processors ofany kind of computer. Generally, a processor will receive instructionsand data from a read-only memory or a random access memory or both. Theessential elements of a computer are a processor for executinginstructions and one or more memories for storing instructions and data.Generally, a computer will also include, or be operatively coupled tocommunicate with, one or more mass storage devices for storing datafiles; such devices include magnetic disks, such as internal hard disksand removable disks; magneto-optical disks; and optical disks. Storagedevices suitable for tangibly embodying computer program instructionsand data include all forms of non-volatile memory, including by way ofexample semiconductor memory devices, such as EPROM, EEPROM, and flashmemory devices; magnetic disks such as internal hard disks and removabledisks; magneto-optical disks; and CD-ROM and DVD-ROM disks. Theprocessor and the memory can be supplemented by, or incorporated in,ASICs (application-specific integrated circuits).

To provide for interaction with a user, the features can be implementedon a computer having a display device such as a CRT (cathode ray tube)or LCD (liquid crystal display) monitor for displaying information tothe user and a keyboard and a pointing device such as a mouse or atrackball by which the user can provide input to the computer.Additionally, such activities can be implemented via touchscreenflat-panel displays and other appropriate mechanisms.

The features can be implemented in a computer system that includes aback-end component, such as a data server, or that includes a middlewarecomponent, such as an application server or an Internet server, or thatincludes a front-end component, such as a client computer having agraphical user interface or an Internet browser, or any combination ofthem. The components of the system can be connected by any form ormedium of digital data communication such as a communication network.Examples of communication networks include a local area network (“LAN”),a wide area network (“WAN”), peer-to-peer networks (having ad-hoc orstatic members), grid computing infrastructures, and the Internet.

The computer system can include clients and servers. A client and serverare generally remote from each other and typically interact through anetwork, such as the described one. The relationship of client andserver arises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other.

While this specification contains many specific implementation details,these should not be construed as limitations on the scope of anyinventions or of what may be claimed, but rather as descriptions offeatures specific to particular implementations of particularinventions. Certain features that are described in this specification inthe context of separate implementations can also be implemented incombination in a single implementation. Conversely, various featuresthat are described in the context of a single implementation can also beimplemented in multiple implementations separately or in any suitablesubcombination. Moreover, although features may be described above asacting in certain combinations and even initially claimed as such, oneor more features from a claimed combination can in some cases be excisedfrom the combination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various systemcomponents in the implementations described above should not beunderstood as requiring such separation in all implementations, and itshould be understood that the described program components and systemscan generally be integrated together in a single software product orpackaged into multiple software products.

Thus, particular implementations of the subject matter have beendescribed. Other implementations are within the scope of the followingclaims. In some cases, the actions recited in the claims can beperformed in a different order and still achieve desirable results. Inaddition, the processes depicted in the accompanying figures do notnecessarily require the particular order shown, or sequential order, toachieve desirable results. In certain implementations, multitasking andparallel processing may be advantageous.

What is claimed is:
 1. A method, comprising: at an electronic devicehaving one or more processors, memory storing one or more programs, oneor more sensors and one or more speakers: receiving a first stream ofaudio data from a first streaming device and playing the first stream ofaudio data via the one or more speakers, wherein the electronic deviceis coupled to the first stream of audio data via a first wireless dataconnection; while playing the first stream of audio data: detecting auser input requesting the electronic device that is currently coupled tothe first streaming device to establish a second wireless dataconnection with a second streaming device that is distinct from thefirst streaming device; and detecting based on a changed orientation ofthe one or more sensors towards the second streaming device inputsignals identifying the second streaming device; in response todetection of the user input and the input signals, establishing thesecond wireless data connection between the electronic device and thesecond streaming device; receiving a second stream of audio data fromthe second streaming device over the second wireless data connection;and causing audio encoded in the second stream of audio data to beplayed through the one or more speakers of the electronic device.
 2. Themethod of claim 1, wherein the electronic device comprises wirelessheadphones, the wireless headphones including the one or more speakersand a wireless communications interface for establishing the first andsecond wireless data connection with the first and second streamingdevices, respectively.
 3. The method of claim 2, wherein detecting theuser input comprises identifying that a control located on the wirelessheadphones has been selected by the user input.
 4. The method of claim1, further comprising: in response to establishing the second wirelessdata connection between the electronic device and the second streamingdevice, generating at least one of visual feedback and aural feedbackwith the electronic device to indicate to a user of the electronicdevice that the second wireless data connection has been established. 5.The method of claim 1, wherein detecting the input signals identifyingthe second streaming device further includes obtaining an identifier ofthe second streaming device when the one or more sensors of theelectronic device are oriented toward the second streaming device tolocate the second streaming device in front of the one or more sensors.6. The method of claim 1, wherein the input signals include aline-of-sight signal emitted by the second streaming device, anddetecting the input signals identifying the second streaming deviceincludes: detecting, by the one or more sensors, the line-of-sightsignal emitted by the second streaming device, wherein the one or moresensors on the electronic device are arranged to (i) detect theline-of-sight signal when the one or more sensors are oriented towardthe second streaming device and are located within a path of theline-of-sight signal, and (ii) disable detection of the line-of-sightsignal when the one or more sensors are oriented away from the secondstreaming device or are located outside of the path of the line-of-sightsignal; and determining, by the electronic device and based oninformation encoded in the line-of-sight signal, an identifier of thesecond streaming device.
 7. The method of claim 6, wherein: theline-of-sight signal emitted by the second streaming device comprises aninfrared data signal; and the one or more sensors on the electronicdevice comprise one or more infrared sensors.
 8. The method of claim 1,wherein the electronic device includes (i) one or more infrared lightsthat comprise an infrared illuminator and (ii) an infrared camera, anddetecting the input signals identifying the second streaming devicefurther includes: activating the one or more infrared lights toilluminate a region in front of the infrared camera of the electronicdevice; and identifying the second streaming device from an image of atleast a portion of the second streaming device that was captured by theinfrared camera while the one or more infrared lights are activated, theinput signals including the image of the portion of the second streamingdevice.
 9. The method of claim 8, wherein the image of the at least theportion of the second streaming device comprises a reflection of aretroreflective component affixed to the second streaming device, theretroreflective component including an identifier for the secondstreaming device.
 10. The method of claim 1, wherein: the one or moresensors on the electronic device comprise a first microphone at a firstlocation on the electronic device and a second microphone at a secondlocation on the electronic device, the second location being separatedby a non-zero distance from the first location; the input signalsinclude an audio signal generated by the second streaming device; anddetecting the input signals identifying the second streaming devicecomprises: detecting, with the first microphone, the audio signalgenerated by the second streaming device; detecting, with the secondmicrophone, the audio signal generated by the second streaming device;comparing the audio signal as detected with the first microphone and theaudio signal as detected with the second microphone; and determining,based on a result of the comparing, whether the second streaming deviceis located in a central region in front of the first microphone and thesecond microphone, such that the first microphone and the secondmicrophone are oriented toward the second streaming device.
 11. Anelectronic device, comprising: one or more processors, one or moresensors; one or more speakers; and memory having instructions storedthereon, which when executed by the one or more processors cause theprocessors to perform operations comprising: receiving a first stream ofaudio data from a first streaming device and playing the first stream ofaudio data via the one or more speakers, wherein the electronic deviceis coupled to the first stream of audio data via a first wireless dataconnection; while playing the first stream of audio data: detecting auser input requesting the electronic device that is currently coupled tothe first streaming device to establish a second wireless dataconnection with a second streaming device that is distinct from thefirst streaming device; and detecting based on a changed orientation ofthe one or more sensors towards a second streaming device input signalsidentifying the second streaming device; in response to detection of theuser input and the input signals, establishing the second wireless dataconnection between the electronic device and the second streamingdevice; receiving a second stream of audio data from the secondstreaming device over the second wireless data connection; and causingaudio encoded in the second stream of audio data to be played throughthe one or more speakers of the electronic device.
 12. The electronicdevice of claim 11, wherein: the one or more sensors on the electronicdevice include a directional microphone that is sensitive to audioemitted from a location in front of at least a portion of the electronicdevice, but that is substantially insensitive to audio emitted fromlocations other than the location in front of the at least the portionof the electronic device; the input signals include an audio signal; anddetecting the input signals identifying the second streaming devicecomprises detecting the audio signal, with the directional microphone,that has been emitted by the second streaming device.
 13. The electronicdevice of claim 11, wherein the second wireless data connectioncomprises a BLUETOOTH connection.
 14. The electronic device of claim 11,wherein the electronic device comprises wireless headphones, thewireless headphones including the one or more speakers and a wirelesscommunications interface for establishing the first and second wirelessdata connection with the first and second streaming devices,respectively.
 15. The electronic device of claim 11, wherein detectingthe user input comprises identifying that a control located on theelectronic device has been selected by the user input.
 16. Anon-transitory computer-readable medium having instructions storedthereon, which when executed by one or more processors cause theprocessors to perform operations comprising: at an electronic devicehaving one or more sensors and one or more speakers: receiving a firststream of audio data from a first streaming device and playing the firststream of audio data via the one or more speakers, wherein theelectronic device is coupled to the first stream of audio data via afirst wireless data connection; while playing the first stream of audiodata: detecting a user input requesting the electronic device that iscurrently coupled to the first streaming device to establish a secondwireless data connection with a second streaming device that is distinctfrom the first streaming device; and detecting based on a changedorientation of the one or more sensors towards a second streaming deviceinput signals identifying the second streaming device; in response todetection of the user input and the input signals, establishing thesecond wireless data connection between the electronic device and thesecond streaming device; receiving a second stream of audio data fromthe second streaming device over the second wireless data connection;and causing audio encoded in the second stream of audio data to beplayed through the one or more speakers of the electronic device. 17.The non-transitory computer-readable medium of claim 16, furthercomprising: in response to detection of the user input and the inputsignals, terminating the first wireless data connection between theelectronic device and the first streaming device.
 18. The non-transitorycomputer-readable medium of claim 16, wherein each of the first andsecond streaming devices is selected from among one of a smartphone, atablet computer, a notebook computer, a smartwatch, a gaming console, adesktop computer, and a streaming music console.
 19. The non-transitorycomputer-readable medium of claim 16, wherein the second wireless dataconnection is established between the electronic device and the secondstreaming device concurrently with the first wireless data connectionestablished between the electronic device and the first streamingdevice, and the second stream of audio data is played through the one ormore speakers of the electronic device concurrently with the firststream of audio data.
 20. The non-transitory computer-readable medium ofclaim 16 having instructions stored thereon for: in response toestablishing the second wireless data connection between the electronicdevice and the second streaming device, generating at least one ofvisual feedback and aural feedback with the electronic device toindicate to a user of the electronic device that the second wirelessdata connection has been established.